import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/index'

import  './element/element.js'
import 'element-ui/lib/theme-chalk/index.css';

Vue.config.productionTip = false

//导入axios
import axios from '../src/utils/require'
Vue.prototype.$http = axios;
/* import axios from "axios"
axios.defaults.baseURL = 'https://www.liulongbin.top:8888/api/private/v1/';
axios.defaults.timeout = 4000; */

axios.interceptors.request.use(config => {
  //为请求头对象，添加token验证的Authorization字段
  config.headers['Authorization'] = sessionStorage.getItem("token")
  return config
})
Vue.config.productionTip = false;


/* 全局注册MList组件 */
import MList from './components/box.vue'
Vue.component('MList',MList)
// 弹框
import Dialog from './components/dialog.vue'
Vue.component("DialogName",Dialog)



new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')




